package day1;

import java.util.HashSet;
import java.util.Set;

/**
 * @author oldliu
 * @since 1.0
 */
public class SetTest2 {
    public static void main(String[] args) {
        Set<Pet> set=new HashSet<>();
        set.add(new Pet("小花花",100,55));
        set.add(new Pet("大黄",66,65));
        set.add(new Pet("旺财",55,66));
        set.add(new Pet("哮天犬",44,100));

        Pet p2=new Pet("旺财",11,100);
        set.add(p2);
        System.out.println(set.size());
        for(Pet s:set)
            System.out.println(s);
    }
}
